import { Text } from "@tarojs/components"
import { CSSProperties } from "react"



interface TagProps {
    children: JSX.Element|string,
    color?: string,
    fontSize?: string,
    padding?: string,
    border?: string,
    borderRadius?: string
}

const Tag = (props: TagProps) => {


    let style: CSSProperties = {
        color: `${props.color ?? "#999999"}`,
        fontSize: `${props.fontSize ?? "22rpx"}`,
        padding: `${props.padding ?? "0rpx 20rpx"}`,
        border: `${props.border ?? "2rpx solid #999999"}`,
        borderRadius: `${ props.borderRadius ?? "calc(37rpx / 2)" }`,
        height: "37rpx",
        lineHeight: `37rpx`,
        width:'120rpx'
    }


    return (
        <Text className="tag" style={style}>{ props.children }</Text>
    )
}

export default Tag